package com.compty.paint.web.member;

import com.compty.core.struts2.BaseAction;
import com.compty.paint.domain.Goods;
import com.compty.paint.manager.GoodsManager;

public class GoodsAction  extends BaseAction<Goods>{

	private static final long serialVersionUID = 5260214064742929170L;
	
	private GoodsManager goodsManager;
	
	/**
	 *@Todo:商品查询
	 *@CreateTime:2012-2-29 下午06:29:26
	 * @return
	 */
	public String queryGoods(){
		
		String painter_name = request.getParameter("painter_name")== null?"":request.getParameter("painter_name");
		String painting_title = request.getParameter("painting_title")== null?"":request.getParameter("painting_title");
		
		this.page = goodsManager.queryGoodsByPainterNameAndTitle(curPage,20,painter_name,painting_title);
		
		request.setAttribute("painter_name", painter_name);
		request.setAttribute("painting_title", painting_title);
		
		return "query_goods";
	}

	public void setGoodsManager(GoodsManager goodsManager) {
		this.goodsManager = goodsManager;
	}

}
